import request from '@/utils/request'
// 获取钱包
export default {
    getWallet() {

        return request({
            url: '/api/payment/getWalletInfo',
            method: 'get',
        })
    },
    submit(form) {
        return request({
            url: '/api/payment/dealWallet',
            method: 'post',
            params:{
                paymentMethod:form.resource,
                type:form.status,
                amount:form.value
            },

        })
    },
    getRecordsByTime(start,end,type){
        return request({
            url:'/api/payment/accountBytime',
            method:'get',
            params:{
                EndTime:end,
                page:1,
                pageSize:10,
                startTime:start,
                type:type
            }
        })
    },

    getIncomeBill(type,pageSize,page) {
        return request({
            url: '/api/payment/getIncomeAndExpenditure',
            method: 'get',
            params:{
                type:type,
                pageSize,
                page
            }

        })
    },
    getMonthIncome() {

        return request({
            url: '/api/payment/currentMonthIncome',
            method: 'get',
        })
    },
    getMonthExpenditure() {

        return request({
            url: '/api/payment/currentMonthExpenditure',
            method: 'get',
        })
    },
    getAllBill(pageSize,page){
        return request({
            url: '/api/payment/page',
            method: 'get',
            params:{
                pageSize,
                page
            }
        })
    }

}

